Collect statistics on the number of times that a URL is securely accessed per minute
Use the time_series function to truncate the value of the time field to minutes. The time field is a system field that indicates the log collection time. The timestamps in seconds are used by default. Use the security_check_url function to check whether the URL is securely accessed. Use the count_if function to check and collect the number of times that the URL is securely accessed. The results are displayed on a line chart, in which the x-axis represents the time and the y-axis on the left represents the number of times that the URL is securely accessed.
SQL
status : * |
SELECT
count_if(
security_check_url (request_uri) = 0
) AS "Secure access count",
time_series(__time__, '1m', '%H:%i', '0') as time
GROUP BY
time
LIMIT
20